package com.xxxx.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xxxx.server.page.BasePage;
import com.xxxx.server.page.EmployeePage;
import com.xxxx.server.pojo.Employee;
import com.xxxx.server.pojo.SalaryEmployee;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhoubin
 * @since 2020-08-17
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

    //根据员工姓名查询员工对象
    Employee getEmployeeByName(String name);

    //多条件查询员工对象
    List selectByParams(EmployeePage employeePage);


    List<Employee> findAllEmployee();

    //查询员工账套
    List<SalaryEmployee> selectSalaryEmployee(@Param("currentPage") Integer currentPage, @Param("size") Integer size);

    //统计数据
    int getTotal();

    //修改更新员工账套所属工资账套
    int updateSalaryEmployee(Integer eid,Integer sid);
}
